/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       font.frag
 * Author:     karooolek
 * Created on: 2014-01-11
 *
 **********************************************************************************************************************/

STRINGIZE(

varying vec4 position;
varying vec4 color;

uniform sampler2D texture;

void main()
{
    // get font from texture
    vec4 tex = texture2D(texture, vec2(gl_TexCoord[0]));
    
    // clamp color
    gl_FragColor = clamp(color * tex,  0.0, 1.0);
}

) // STRINGIZE
